<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
<div ng-app="myApp" ng-controller="costCtrl">
    <input type="number" ng-model="quantity">
    <input type="number" ng-model="price">
    <p>总价 = {{ (quantity * price) | currency }}</p>
</div>
<script>
    var app = angular.module('myApp',[]);
    app.controller('costCtrl',function ($scope) {
        $scope.quantity = 1;
        $scope.price
    });
</script>
</body>
</html>